#include <iostream>
using namespace std;
class A{
public:
	int a;
	A(){
		cout << "构造函数" << endl;
	}
};
class B:virtual public A{};
class C:virtual public A{};
class D:public B,public C{};
int main()
{
	D a;
	a.B::a=10;
	cout << a.B::a << endl;
	cout << a.C::a << endl;
	a.C::a=20;
	cout << a.B::a << endl;
	cout << a.C::a << endl;

	return 0;
}
